<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <title>CMS后台管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <link th:replace="resource :: css" rel="stylesheet"/>
</head>
<body>
<div class="container-fluid">
    <form class="form-horizontal" role="form" action="update" method="post">
        <input type="hidden" name="id" value="$!entity.id">
        <div class="form-group">
            <label class="col-sm-2 control-label">用户组</label>
            <div class="col-sm-10">
                <select class="form-control" name="group">
                    #foreach($e in $!groups)
                        <option value="$!e.id" #if($!e.id == $!entity.group.id) selected #end>$!e.name</option>
                    #end
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">状态</label>
            <div class="col-sm-10">
                <select class="form-control" name="userState">
                    #foreach($e in $!userStates)
                        <option value="$!e" #if($!e == $!entity.userState) selected #end>$!e.name</option>
                    #end
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">昵称</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" placeholder="" name="nickname" value="$!entity.nickname">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" placeholder="" name="username" required value="$!entity.username">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">密码</label>
            <div class="col-sm-10">
                <input type="password" class="form-control" placeholder="" name="password" required value="$!entity.password">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">真实姓名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" placeholder="" name="realname" value="$!entity.realname">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">性别</label>
            <div class="col-sm-10">
                <select class="form-control" name="recommendLevel">
                    #foreach($e in $!genders)
                        <option value="$!e" #if($!e == $!entity.gender) selected #end>$!e.name</option>
                    #end
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">出生日期</label>
            <div class="col-sm-10">
                <input type="text" class="form-control dateFormat" placeholder="" name="birthday" value="$!entity.birthday">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">电子邮箱</label>
            <div class="col-sm-10">
                <input type="email" class="form-control" placeholder="" required name="email" value="$!entity.email">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">手机号</label>
            <div class="col-sm-10">
                <input type="tel" class="form-control" placeholder="" maxlength="16" required name="mobile" value="$!entity.mobile">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">QQ</label>
            <div class="col-sm-10">
                <input type="number" class="form-control" placeholder="" max="99999999999" name="QQ" value="$!entity.QQ">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">地址</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" placeholder="" name="address" value="$!entity.address">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">邮编</label>
            <div class="col-sm-10">
                <input type="number" class="form-control" placeholder="" name="zipCode" value="$!entity.zipCode">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">头像</label>
            <div class="col-sm-10">
                <div class="input-group">
                    <input type="text" class="form-control" placeholder="" name="" id="titleImg" value="$!entity.titleImg">
                    <a href="javascript:void(0);" class="input-group-addon previewImg" target-id="titleImg">预览</a>
                    <a href="javascript:void(0);" class="input-group-addon uploadImg" target-id="titleImg">上传</a>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">个人资料</label>
            <div class="col-sm-10">
                <textarea class="form-control" rows="5" name="info">$!entity.info</textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">保存</button>
                <a class="btn btn-success" href="list">返回</a>
            </div>
        </div>
    </form>
</div>
    <script th:replace="resource :: js"></script>
    #include("commons/support-image.vm")
</body>
</html>
